package com.pengpeng.mybatis.plus.service;

import com.pengpeng.mybatis.plus.entity.User;

import java.util.List;
import java.util.Map;

/**
 * @author 彭鹏
 * @date 2021/10/29.
 */
public interface UserService {
    public List<User> queryAll();
    //添加一条数据
    public int add(User user);
    //添加多条数据
    public void add(List<User> users);

    public User queryById(User user);

    public List<User> queryByName(String name);

    public List<User> queryByName2(String name);

    public List<User> queryByNameMap(String name);

    public List<User> queryByIds();

    public Long count();

    // 根据条件更新
    public void changeBy(User user, String column, Object val);

    // 通过ID修改信息
    public void changeUserById(User user);

    public int deleteById(User user);

    public void deleteBy(String column, Object val);

    public void delete(Map<String, Object> map);

    public void deleteByIds();
}
